scripty2

class Element.Offset

Description

A representation of the top- and left-offsets of an element relative to another.

Constructor

new Element.Offset(left, top)

Instantiates an Element.Offset. You shouldn't need to call this directly.

Instance methods

  • inspect #

    Element.Offset#inspect() -> String
  • relativeTo #

    Element.Offset#relativeTo(offset) -> Element.Offset

    Returns a new Element.Offset with its origin at the given offset. Useful for determining an element's distance from another arbitrary element.

  • toArray #

    Element.Offset#toArray() -> Array
  • toString #

    Element.Offset#toString() -> String